• Description:
    Order must be following: "DMOD", "MODS", "CNST", "OBJC", "#def", "LIBR", "EXPR", "EDEF", "LINK", "HEAD". While each of the above can be skipped.
    In the Format part are used following keywords:

    LONG store a long with given data(s)
    WORD store a word with given data(s)
    BYTE/UBYTE store a byte with given data(s)
    CHAR store a name including termination zero
    EVEN make the address in file even (by adding a zero byte)

    WHILE/ENDWHILE conditional loop
    IF/ELSEIF/ELSE/ENDIF conditional statemens

    For any questions e-mail me.

  • Format:
        // binary module head:
      LONG  "DMOD"
      WORD  version, revision
    
    // included modules: LONG "MODS" WORD count of modules WHILE module // each included module: WORD StrLen(module.name) CHAR module.name,0 EVEN module:=module.next // get next module ENDWHILE
    // Constants: LONG "CNST" WORD count of constants LONG data part length // this is length in bytes of whole datatable of constants LONG name list length // this is length in bytes of all constant names including string terminating zeros first:=constant // store first constant WHILE constant // known flags are currently: // %001 - S_PRIVATE // for private constants // %010 - S_INTERNAL // for internal constants, never use, only for internal powerd module writer // %100 - S_TAG // needed only for tags IF type=DOUBLE or FLOAT constant: // DOUBLE/FLOAT constant: UBYTE 8, flags DOUBLE value ELSEIF highword=$8000 // tag constant: UBYTE 1, flags|%100 WORD lowword value ELSEIF highword=$0000 or $ffff // word constant (high-word=$0000 or $ffff): UBYTE 3, flags WORD low-word value ELSEIF constant=0 // zero constant (constant=0): UBYTE $ff,flags ELSE // constant (tag, word and zero constants can be used also here): UBYTE 1, flags LONG value ENDIF constant:=constant.next // get next constant ENDWHILE constant:=first // restore first constant WHILE constant CHAR constant.name,0 constant:=constant.next // get next constant ENDWHILE EVEN
    LONG "OBJC" LONG data length, name list length WORD object count, item count
    // LINK OPTions LONG "LINK" WORD count of links WHILE link WORD StrLen(link.name) CHAR link.name,0 EVEN link:=link.next // get next module ENDWHILE
    // HEAD OPTion LONG "HEAD" WORD StrLen(head.name) CHAR head.name,0 EVEN